package json;

import java.util.List;

public class Person
{
	private String name;
	private int age;

	private List<Person> childs;

	public Person()
	{
	}

	public Person(String name, int age)
	{
		super();
		this.name = name;
		this.age = age;
	}

	public int getAge()
	{
		return age;
	}

	public void setAge(int age)
	{
		this.age = age;
	}

	public String getName()
	{
		return name;
	}

	public void setName(String name)
	{
		this.name = name;
	}

	public List<Person> getChilds()
	{
		return childs;
	}

	public void setChilds(List<Person> childs)
	{
		this.childs = childs;
	}

	@Override
	public boolean equals(Object obj)
	{
		if (this == obj)
		{
			return true;
		}
		if (obj == null)
		{
			return false;
		}
		if (getClass() != obj.getClass())
		{
			return false;
		}
		Person other = (Person) obj;
		if (age != other.age)
		{
			return false;
		}
		if (name == null)
		{
			if (other.name != null)
			{
				return false;
			}
		}
		else if (!name.equals(other.name))
		{
			return false;
		}
		return true;
	}

}
